package com.atguigu05._super.exer1;

/**
 * ClassName: ManKind
 * Package: com.atguigu03._extends.exer1
 * Description:
 *1)定义一个ManKind类，包括
 *
 * - 成员变量int sex和int salary；
 * - 方法void manOrWoman()：根据sex的值显示“man”(sex==1)或者“woman”(sex==0)；
 *
 * - 方法void employeed()：根据salary的值显示“no job”(salary==0)或者“ job”(salary!=0)。
 * @Author xiao_qi
 * @Create 2024/5/9 21:03
 * @Version 1.0
 */
public class ManKind {
    int sex;
    int salary;

    public ManKind() {

    }

    public void mainOrWoman(){
        if (sex == 1) {
            System.out.println("man");
        } else if (sex == 0) {
            System.out.println("woman");
        }
    }

    public ManKind(int sex, int salary) {
        this.sex = sex;
        this.salary = salary;
    }

    public void employeed(){
        if (salary == 0) {
            System.out.println("no job");
        }
        else {
            System.out.println("job");
        }

}}
